<template>
	<div id="contentBox">
		<div class="searchBox">
			<el-form :inline="true"  ref="searchForm"  :model="searchForm" label-width="96px">
				<el-form-item label="发布日期起" prop="startDate" >
				    <el-date-picker :editable="false"   
				      @change="debounceSeach"
				      v-model="searchForm.startDate"
				      type="date"
				      placeholder="选择日期"
				      :picker-options="startDateOpt"
				      >
				    </el-date-picker>
				</el-form-item>
				<el-form-item label="发布日期止" prop="endDate" >
				    <el-date-picker :editable="false"  
				      @change="debounceSeach"
				      v-model="searchForm.endDate"
				      type="date"
				      placeholder="选择日期"
				      :picker-options="endDateOpt"
				      >
				    </el-date-picker>
				</el-form-item>
	            <el-form-item label="经销商名称" prop="dealerName">
				    <el-input v-model="searchForm.dealerName" placeholder="请输入搜索内容..." @input.native="debounceSeach" >
				    </el-input >
				</el-form-item>
				
	            <el-form-item label="汽车车型"  prop="carBrandNameAndCarName">
				   <el-input v-model="searchForm.carBrandNameAndCarName" placeholder="请输入搜索内容..." @input.native="debounceSeach" ></el-input >
				</el-form-item>
				<el-form-item style="width:100%!important;text-align:center; margin-bottom: 10px;">
				    <el-button @click="resetSearchForm('searchForm')">重置</el-button>
				</el-form-item>
			</el-form>
		</div>
		<div id="tableBox" style="margin:25px 25px 0;" >
			<el-table :data="tableData.data" border  >
			    <el-table-column label="汽车车型" :min-width="200">
			      <template scope="scope">
			        <span >{{ scope.row.carBrandNameAndCarName }}</span>
			      </template>
			    </el-table-column>
			    <el-table-column label="外观/内饰颜色" width="140">
			      <template scope="scope">
			        <span >{{ scope.row.interiorColor }}</span>
			      </template>
			    </el-table-column>
			    <el-table-column label="报价(万)" width="120">
			      <template scope="scope">
			        <span >{{ scope.row.price|toWFixed2 }}</span>
			      </template>
			    </el-table-column>
			    <el-table-column label="指导价(万)" width="120">
			      <template scope="scope">
			        <span >{{ scope.row.carTypePrice|toWFixed2 }}</span>
			      </template>
			    </el-table-column>
			    <el-table-column label="是否现货" width="80">
			      <template scope="scope">
			        <span >{{ scope.row.carInStock?"是":"否" }}</span>
			      </template>
			    </el-table-column>
			     <el-table-column label="发布经销商" width="140">
			      <template scope="scope">
			        <span >{{ scope.row.dealerName }}</span>
			      </template>
			    </el-table-column>
			     <el-table-column label="发布时间" width="160">
			      <template scope="scope">
			        <span >{{ scope.row.addDate }}</span>
			      </template>
			    </el-table-column>
			    <!--  <el-table-column label="审核状态" width="100">
			     <template scope="scope">
			       <span  v-for="(index, item) in scope.row.statusVO" >{{ item }}</span>
			     </template>
			    			    </el-table-column> -->
			    <el-table-column label="操作" width="120">
			      <template scope="scope">
			      	<el-button size="small" @click="handleEdit(scope.$index, scope.row)">审核</el-button>
			      	<el-button size="small" @click="handleSee(scope.$index, scope.row)">查看</el-button>
			      	
			      </template>
			    </el-table-column>
			</el-table>
			<el-dialog  title="待审核车源"  v-if="dialogSendData.dialogFormVisible" :visible.sync="dialogSendData.dialogFormVisible"  :lock-scroll='false' top=5% :close-on-click-modal="false">
				<dialogForm :dialogSendData="dialogSendData" :tableData="tableData" v-on:refreshSeachData="seachData"></dialogForm>
				
			</el-dialog>
	    </div>
	    <div class="block" style="text-align: center;margin-top: 15px;">
		    <pagination v-on:refreshSeachData="seachData"  :tableData="tableData" :searchForm="searchForm||{}"></pagination>
		</div>
	</div>
</template>
<script src="./index.js">

</script>
<style scoped lang="stylus" rel="styleheet/stylus">
	@import './index.styl';
</style>